﻿// -------------------------------------------------------------------------
//    @FileName         :    NFCDPart.cpp
//    @Author           :    gaoyi
//    @Date             :    2025/1/7
//    @Email            :    445267987@qq.com
//    @Module           :    NFCDPart
//
// -------------------------------------------------------------------------

#include "NFCDPart.h"

#include "proto_db.pb.h"

NFCDPart::NFCDPart()
{
    if (EN_OBJ_MODE_INIT == NFShmMgr::Instance()->GetCreateMode())
    {
        CreateInit();
    }
    else
    {
        ResumeInit();
    }
}

NFCDPart::~NFCDPart()
{
}

int NFCDPart::CreateInit()
{
    return 0;
}
    
int NFCDPart::ResumeInit()
{
    return 0;
}

int NFCDPart::LoadFromDB(const proto_ff::tbRoleDetail* pDBData)
{
    m_stData.FromPb(pDBData->role_play_data().cd_data());
    return 0;
}

int NFCDPart::InitConfig(proto_ff::tbRoleDetail* pDbData, const RoleOne& stRoleOne)
{
    pDbData->mutable_role_play_data()->mutable_cd_data();
    return 0;
}

int NFCDPart::SaveDB(proto_ff::tbRoleDetail* pDBData)
{
    m_stData.ToPb(pDBData->mutable_role_play_data()->mutable_cd_data());
    return 0;
}

int NFCDPart::MakePlayerDataCS(proto_ff::Proto_CSGetRoleRsp* pCSGetRoleRsp)
{
    return 0;
}

int NFCDPart::MakeCityPlayerData(proto_ff::CityRoleInfo* pGCCityRoleInfo)
{
    return 0;
}
